<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="/static/js/jquery.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
            var roomId      = "{$roomId}";
            //创建一个socket实例
            var socket      = null; //初始为null
            socket = new WebSocket("ws://127.0.0.1:8282");
            socket.onmessage = function (ev) { //使用进行回调（获取）
                console.log(ev);
                var data = JSON.parse(ev.data);
                var bind = '{"type":"getUidListByGroup","roomId":"'+roomId+'"}';
                socket.send(bind); //发送给服务器要求绑定用户
            }
        })
    </script>
</head>
<body>

</body>
</html>